package com.demo.chapter6collect;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

public class InvoiceTotaldetail implements Serializable{

	/**
	 * 发票汇总明细表
	 */
	private static final long serialVersionUID = 8369258888734843015L;
	private Integer invoiceTotaldetailId;//明细ID
	private Long invoiceId;//发票ID
	private String productName;//明细名称
	private Integer productNum;//商品数量
	private BigDecimal money;//不含税总金额
	private BigDecimal taxRate	;//税率
	private BigDecimal unitprice;//单价
	private BigDecimal taxmoney;//	含税总金额
	private Date addtime;//添加日期
	private InvoiceDetailClassEnum invoiceClassId;//发票类容ID

	public Integer getInvoiceTotaldetailId() {
		return invoiceTotaldetailId;
	}
	public void setInvoiceTotaldetailId(Integer invoiceTotaldetailId) {
		this.invoiceTotaldetailId = invoiceTotaldetailId;
	}
	public Long getInvoiceId() {
		return invoiceId;
	}
	public void setInvoiceId(Long invoiceId) {
		this.invoiceId = invoiceId;
	}
	public String getProductName() {
		return productName;
	}
	public void setProductName(String productName) {
		this.productName = productName;
	}
	public Integer getProductNum() {
		return productNum;
	}
	public void setProductNum(Integer productNum) {
		this.productNum = productNum;
	}
	public BigDecimal getMoney() {
		return money;
	}
	public void setMoney(BigDecimal money) {
		this.money = money;
	}
	public BigDecimal getTaxRate() {
		return taxRate;
	}
	public void setTaxRate(BigDecimal taxRate) {
		this.taxRate = taxRate;
	}
	public BigDecimal getUnitprice() {
		return unitprice;
	}
	public void setUnitprice(BigDecimal unitprice) {
		this.unitprice = unitprice;
	}
	public BigDecimal getTaxmoney() {
		return taxmoney;
	}
	public void setTaxmoney(BigDecimal taxmoney) {
		this.taxmoney = taxmoney;
	}
	public Date getAddtime() {
		return addtime;
	}
	public void setAddtime(Date addtime) {
		this.addtime = addtime;
	}
	public InvoiceDetailClassEnum getInvoiceClassId() {
		return invoiceClassId;
	}
	public void setInvoiceClassId(InvoiceDetailClassEnum invoiceClassId) {
		this.invoiceClassId = invoiceClassId;
	}

	public InvoiceTotaldetail() {
		super();
	}
	public InvoiceTotaldetail(BigDecimal taxmoney) {
		super();
		this.taxmoney = taxmoney;
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime
				* result
				+ ((invoiceTotaldetailId == null) ? 0 : invoiceTotaldetailId
						.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		InvoiceTotaldetail other = (InvoiceTotaldetail) obj;
		if (invoiceTotaldetailId == null) {
			if (other.invoiceTotaldetailId != null)
				return false;
		} else if (!invoiceTotaldetailId.equals(other.invoiceTotaldetailId))
			return false;
		return true;
	}

}
